﻿
using System;
using System.Web;
using System.Collections.Generic;
using BLToolkit.Mapping;
using BLToolkit.Data;
using BLToolkit.Reflection;

/// <summary>Ticket_id</summary>
public class Ticket : LoggingObject
{
	[Nullable]
	[MapField("Ticket_id")]
	public Int64 Id { get; set; }

	[Nullable]
	public Int64 Trip_id { get; set; }

	[Nullable]
	public Int64 PersonTicket_id { get; set; }

	[Nullable]
	public Int64 SysAccount_id { get; set; }

	[Nullable]
	[MapField("Ticket_Place")]
	public Int32 Place { get; set; }

	[Nullable]
	public Int64 SourceStation_id { get; set; }

	[Nullable]
	public Int64 TargetStation_id { get; set; }

	[Nullable]
	public DateTime Ticket_DateTime { get; set; }

	public bool Merge()
	{
		try
		{
			SetLoggingInfo();
			this.Id = DBEntity<Ticket>.Merge(this);
			return true;
		}
		catch { return false; }
	}
}
